//
//  ConsulationAskCellModel.m
//  EnvironmentalProtection
//
//  Created by HCreater on 2018/11/3.
//  Copyright © 2018年 HCreater. All rights reserved.
//

#import "ConsulationAskCellModel.h"

#import "ReplyInfoData.h"

@interface ConsulationAskCellModel ()

@property (nonatomic, copy) NSString* title;
@property (nonatomic, copy) NSString* content;
@property (nonatomic, copy) NSString* name;
@property (nonatomic, copy) NSString* time;
@property (nonatomic, copy) NSString* imgurl;
@property (nonatomic, copy) NSString* image;

@end

@implementation ConsulationAskCellModel

- (instancetype)initWithData:(id)data cellHeight:(CGFloat)cellHeight
{
    self = [super init];
    if (self)
    {
        _data = data;
        
        /// cellHeight+2（2容错）
        _cellHeight = MHUIScaleValue(cellHeight)+2;
        
        ReplyInfoData* replyInfoData = _data;
        
        self.title = replyInfoData.title;
        self.content = replyInfoData.content;
        self.name = replyInfoData.user.nickname;
        self.time = replyInfoData.addTime;
        self.imgurl = replyInfoData.user.headimg;
        self.image = replyInfoData.image;
    }
    
    return self;
}

@end
